package com.chengyu.core.domain.form;

import com.chengyu.core.constants.DateConstants;
import com.chengyu.core.domain.enums.GoodsEnums;
import com.chengyu.core.domain.enums.OrderEnums;
import com.chengyu.core.exception.CommonException;
import com.chengyu.core.utils.CommonDateUtil;
import com.chengyu.core.utils.CommonUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.List;

@Getter
@Setter
public class GoodsSearchForm {


	private Integer shopId;

	private Integer catePid;

	private Integer cateTid;

	private Integer cateId;

	private String cateIds;




//	private Integer cateIdinCateIds;


	private List<Integer> catePidList;

	private Integer shopCatePid;

	private Integer shopCateTid;

	private Integer shopCateId;

	private String title;

	private Integer type;
	private Integer petType;
	private String types;
	private Integer attr;
	private Integer brandId;

	@ApiModelProperty(value = "销量:sell_num desc,新上架:add_time desc,价格高:price desc,价格低:price asc")
	private String sort;

	private Integer status;


	private Integer stype;//搜索类型


	private Integer stock;//库存
	private Integer hasStock;//有库存




//	//构造方法：
//	public GoodsSearchForm(Integer stype) {
//		switch (stype) {
//			case 1:
////				this.setStatus(GoodsEnums.GoodsStatus.SELL);
//				this.status = GoodsEnums.GoodsStatus.SELL.getValue();
//				break;
//			case 2:
////				this.setStatus(GoodsEnums.GoodsStatus.SELL);
//				this.status = GoodsEnums.GoodsStatus.IN_WAREHOUSE.getValue();
//				break;
//			case 3:
////				this.setStatus(GoodsEnums.GoodsStatus.SELL);
//				this.stock = GoodsEnums.GoodsStatus.SELL.getValue();
//				break;
//			case 4:
////				this.setStatus(GoodsEnums.GoodsStatus.SELL);
//				this.status = GoodsEnums.GoodsStatus.SELL.getValue();
//				break;
//			case 5:
////				this.setStatus(GoodsEnums.GoodsStatus.SELL);
//				this.status = GoodsEnums.GoodsStatus.SELL.getValue();
//				break;
//			case 6:
////				this.setStatus(GoodsEnums.GoodsStatus.SELL);
//				this.status = GoodsEnums.GoodsStatus.SELL.getValue();
//				break;
//
//
//			default:
//
//				break;
//		}
//	}
//	  switch (stype) {
//		case 1:
//			$status = GoodsEnums.GoodsStatus.SELL
//			break;
//		case 2:
//			$where = ['is_show' => 0, 'status' => 1];
//			break;
//		case 3:
//			$where = ['is_show' => 1, 'stock' => 0, 'status' => 1];
//			break;
//
//		default:
//			//                $where = ['is_show' => 1, 'status' => 1];
//			break;
//	}

	private Integer spreadStatus;

	private BigDecimal minAmount;

	private BigDecimal maxAmount;

	private String provinceCode;

	private String cityCode;

	@ApiModelProperty(value = "是否查询平台商品库")
	private Boolean queryPlatformGoods = false;

	private String keyword;


}
